package com.jingyong.infosite.web;

import java.util.List;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.fasterxml.jackson.core.type.TypeReference;
import com.jingyong.infosite.entities.评级;
import com.jingyong.infosite.util.JsonUtil;

import io.swagger.annotations.Api;

@RequestMapping(path = "ratings")
@Api("评级数据")
public class RatingsContoller {

	private static final String RATINGS_JSON = "{\"平台\":\"宜人贷\",\"投资人数\":\"135822\",\"满标用时\":\"1.47\",\"前十大土豪待收金额占比\":\"0.41\",\"人均投资金额\":\"0.17\"}";

	@RequestMapping(path = "", method = RequestMethod.GET)
	public List<评级> getDeals() {
		return JsonUtil.convertStringToBean(RATINGS_JSON, new TypeReference<List<评级>>() {
		});
	}
}
